/**
 *====================================================
 * 文件名称: ContainerInventoryRelieveServiceImpl.java
 * 修订记录：
 * No    日期				作者(操作:具体内容)
 * 1.    2015年11月19日	chenxy(创建:创建文件)
 *====================================================
 * 类描述：(说明未实现或其它不应生成javadoc的内容)
 */
package com.yuexunit.finance.project.service;

import com.yuexunit.finance.common.util.BeanUtils;
import com.yuexunit.finance.project.entity.ContainerInventoryRelieveEntity;
import com.yuexunit.inject.annotation.Implements;
import com.yuexunit.persist.PersistUtil;
import com.yuexunit.util.DateUtil;

/**
 * @ClassName: ContainerInventoryRelieveServiceImpl
 * @Description: TODO(这里用一句话描述这个类的作用)
 * @author chenxy
 * @date 2015年11月19日 17:29:55
 */
@Implements(ContainerInventoryRelieveService.class)
public class ContainerInventoryRelieveServiceImpl implements ContainerInventoryRelieveService {

	@Override
	public void createContainerInventoryRelieve(ContainerInventoryRelieveEntity entity) {
		entity.setRelieveCreateDateTime(DateUtil.now());
		PersistUtil.insert(entity);
	}

	@Override
	public void updateContainerInventoryRelieve(ContainerInventoryRelieveEntity entity) {
		ContainerInventoryRelieveEntity persist = inquireContainerInventoryRelieve(entity.getInventoryId());
		BeanUtils.copyProperties(entity, persist);
		PersistUtil.update(persist);
	}

	@Override
	public void renovateContainerInventoryRelieve(ContainerInventoryRelieveEntity persist) {
		PersistUtil.update(persist);
	}

	@Override
	public void deleteContainerInventoryRelieve(Long inventoryId) {
		PersistUtil.delete(ContainerInventoryRelieveEntity.class, inventoryId);
	}

	@Override
	public ContainerInventoryRelieveEntity inquireContainerInventoryRelieve(Long inventoryId) {
		return PersistUtil.get(ContainerInventoryRelieveEntity.class, inventoryId);
	}
}
